package com.aaa.security;

import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;

public class TestEncoder  {
    public static void main(String[] args) {
      BCryptPasswordEncoder bCryptPasswordEncoder = new BCryptPasswordEncoder();//密码编码格式
        String rs="123";
        System.out.println(bCryptPasswordEncoder.encode(rs));
        boolean b=bCryptPasswordEncoder.matches(rs,"$2a$10$DBacW9/x7vkWD8iktmDQeO/XGJuoGH7Kboina5rcW1A13s2p5dVdO");
        System.out.println(b);//匹配结果为true
        for (int i=0;i<=5;i++){
            for (int j=0;j<=i;j++){

                System.out.print("_");
            }
            System.out.println("");
        }
    }
}
